<% if @user.errors.any? %>
  <div id="error_explanation">
    <div class="alert alert-danger">
      错误：<%= pluralize(@user.errors.count, "error") %>
    </div>

    <ul>
      <% @user.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
    </ul>
  </div>
<% end %>